.class public Ldgb/a0;
.super Ljava/lang/Object;
.source "SourceFile"


# direct methods
.method public static a(Landroid/database/sqlite/SQLiteDatabase;)I
    .locals 6

    const-string v0, "Close has IOException!"

    const-string v1, "stat.DBUtils"

    const/4 v2, 0x0

    const/4 v3, 0x0

    .line 1
    :try_start_0
    new-instance v4, Ljava/io/FileInputStream;

    new-instance v5, Ljava/io/File;

    invoke-virtual {p0}, Landroid/database/sqlite/SQLiteDatabase;->getPath()Ljava/lang/String;

    move-result-object p0

    invoke-direct {v5, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-direct {v4, v5}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
    :try_end_0
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_e
    .catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_c
    .catch Ljava/lang/NullPointerException; {:try_start_0 .. :try_end_0} :catch_a
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_8
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_6
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    .line 2
    :try_start_1
    invoke-virtual {v4}, Ljava/io/FileInputStream;->available()I

    move-result p0
    :try_end_1
    .catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_1} :catch_5
    .catch Ljava/lang/SecurityException; {:try_start_1 .. :try_end_1} :catch_4
    .catch Ljava/lang/NullPointerException; {:try_start_1 .. :try_end_1} :catch_3
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_2
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 3
    :try_start_2
    invoke-virtual {v4}, Ljava/io/FileInputStream;->close()V
    :try_end_2
    .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_0

    :catch_0
    move-exception v2

    .line 4
    sget-boolean v3, Ldgb/z;->d:Z

    if-eqz v3, :cond_0

    .line 5
    invoke-static {v1, v0, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_0
    :goto_0
    return p0

    :catchall_0
    move-exception p0

    move-object v3, v4

    goto/16 :goto_b

    :catch_1
    move-exception p0

    move-object v3, v4

    goto :goto_1

    :catch_2
    move-exception p0

    move-object v3, v4

    goto :goto_3

    :catch_3
    move-exception p0

    move-object v3, v4

    goto :goto_5

    :catch_4
    move-exception p0

    move-object v3, v4

    goto :goto_7

    :catch_5
    move-exception p0

    move-object v3, v4

    goto/16 :goto_9

    :catchall_1
    move-exception p0

    goto/16 :goto_b

    :catch_6
    move-exception p0

    .line 6
    :goto_1
    :try_start_3
    sget-boolean v4, Ldgb/z;->d:Z

    if-eqz v4, :cond_1

    const-string v4, "GetDbSize has Exception!"

    .line 7
    invoke-static {v1, v4, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_1

    :cond_1
    if-eqz v3, :cond_2

    .line 8
    :try_start_4
    invoke-virtual {v3}, Ljava/io/FileInputStream;->close()V
    :try_end_4
    .catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_7

    goto :goto_2

    :catch_7
    move-exception p0

    .line 9
    sget-boolean v3, Ldgb/z;->d:Z

    if-eqz v3, :cond_2

    .line 10
    invoke-static {v1, v0, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_2
    :goto_2
    return v2

    :catch_8
    move-exception p0

    .line 11
    :goto_3
    :try_start_5
    sget-boolean v4, Ldgb/z;->d:Z

    if-eqz v4, :cond_3

    const-string v4, "GetDbSize has IOException!"

    .line 12
    invoke-static {v1, v4, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_1

    :cond_3
    if-eqz v3, :cond_4

    .line 13
    :try_start_6
    invoke-virtual {v3}, Ljava/io/FileInputStream;->close()V
    :try_end_6
    .catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_9

    goto :goto_4

    :catch_9
    move-exception p0

    .line 14
    sget-boolean v3, Ldgb/z;->d:Z

    if-eqz v3, :cond_4

    .line 15
    invoke-static {v1, v0, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_4
    :goto_4
    return v2

    :catch_a
    move-exception p0

    .line 16
    :goto_5
    :try_start_7
    sget-boolean v4, Ldgb/z;->d:Z

    if-eqz v4, :cond_5

    const-string v4, "GetDbSize has NullPointerException!"

    .line 17
    invoke-static {v1, v4, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_7
    .catchall {:try_start_7 .. :try_end_7} :catchall_1

    :cond_5
    if-eqz v3, :cond_6

    .line 18
    :try_start_8
    invoke-virtual {v3}, Ljava/io/FileInputStream;->close()V
    :try_end_8
    .catch Ljava/io/IOException; {:try_start_8 .. :try_end_8} :catch_b

    goto :goto_6

    :catch_b
    move-exception p0

    .line 19
    sget-boolean v3, Ldgb/z;->d:Z

    if-eqz v3, :cond_6

    .line 20
    invoke-static {v1, v0, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_6
    :goto_6
    return v2

    :catch_c
    move-exception p0

    .line 21
    :goto_7
    :try_start_9
    sget-boolean v4, Ldgb/z;->d:Z

    if-eqz v4, :cond_7

    const-string v4, "GetDbSize has SecurityException!"

    .line 22
    invoke-static {v1, v4, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_9
    .catchall {:try_start_9 .. :try_end_9} :catchall_1

    :cond_7
    if-eqz v3, :cond_8

    .line 23
    :try_start_a
    invoke-virtual {v3}, Ljava/io/FileInputStream;->close()V
    :try_end_a
    .catch Ljava/io/IOException; {:try_start_a .. :try_end_a} :catch_d

    goto :goto_8

    :catch_d
    move-exception p0

    .line 24
    sget-boolean v3, Ldgb/z;->d:Z

    if-eqz v3, :cond_8

    .line 25
    invoke-static {v1, v0, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_8
    :goto_8
    return v2

    :catch_e
    move-exception p0

    .line 26
    :goto_9
    :try_start_b
    sget-boolean v4, Ldgb/z;->d:Z

    if-eqz v4, :cond_9

    const-string v4, "GetDbSize has FileNotFoundException!"

    .line 27
    invoke-static {v1, v4, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
    :try_end_b
    .catchall {:try_start_b .. :try_end_b} :catchall_1

    :cond_9
    if-eqz v3, :cond_a

    .line 28
    :try_start_c
    invoke-virtual {v3}, Ljava/io/FileInputStream;->close()V
    :try_end_c
    .catch Ljava/io/IOException; {:try_start_c .. :try_end_c} :catch_f

    goto :goto_a

    :catch_f
    move-exception p0

    .line 29
    sget-boolean v3, Ldgb/z;->d:Z

    if-eqz v3, :cond_a

    .line 30
    invoke-static {v1, v0, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_a
    :goto_a
    return v2

    :goto_b
    if-eqz v3, :cond_b

    .line 31
    :try_start_d
    invoke-virtual {v3}, Ljava/io/FileInputStream;->close()V
    :try_end_d
    .catch Ljava/io/IOException; {:try_start_d .. :try_end_d} :catch_10

    goto :goto_c

    :catch_10
    move-exception v2

    .line 32
    sget-boolean v3, Ldgb/z;->d:Z

    if-eqz v3, :cond_b

    .line 33
    invoke-static {v1, v0, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 34
    :cond_b
    :goto_c
    throw p0
.end method

.method public static b(Landroid/database/sqlite/SQLiteDatabase;)V
    .locals 2

    if-eqz p0, :cond_0

    .line 1
    :try_start_0
    invoke-virtual {p0}, Landroid/database/sqlite/SQLiteDatabase;->close()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p0

    .line 2
    sget-boolean v0, Ldgb/z;->d:Z

    if-eqz v0, :cond_0

    const-string v0, "stat.DBUtils"

    const-string v1, "Failed to close the db!"

    .line 3
    invoke-static {v0, v1, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_0
    :goto_0
    return-void
.end method
